<%--
  Created by IntelliJ IDEA.
  User: 91228
  Date: 2022/8/4
  Time: 20:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>Title</title>
    <style>
        div{
            width: 900px;
            margin: 0 auto;
        }
        h1{
            text-align: center;

        }
        #trm{
            background-color: green;
        }
    </style>
</head>
<body>
<div>
    <%
        String str=(String)request.getAttribute("mess");
        if(str!=null){
            out.println(str);
        }
    %>
    <form action="${pageContext.request.contextPath}/book/bookupdate" method="post">
    <table border="1">
        <tr id="trm">
            <td colspan="2"><h1>更新电子图书</h1></td>
        </tr>
        <tr>
            <td >图书编号<span style="color:red">(*)</span></td>
            <td>
                <input type="text" name="id" id="id" value="${entryById.id}">
            </td>
        </tr>
        <tr>
            <td >图书名称<span style="color:red">(*)</span></td>
            <td><input type="text" name="title" id="title" value="${entryById.title}"></td>
        </tr>
        <tr>
            <td>图书摘要</td>
            <td><textarea cols="70" rows="10"  name="summary"><${entryById.summary}></textarea></td>
        </tr>
        <tr>
            <td >图书分类：</td>
            <td>
                <select name="categoryId">
                    <option value="${entryById.categoryId}">${entryById.name}</option>
                    <c:forEach items="${list}" var="list">
                        <option value="${list.id}">${list.name}</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr>
            <td >上传人</td>
            <td><input type="text" name="uploaduser" value="${entryById.uploaduser}" /></td>
        </tr>
        <tr>
            <td >上传时间<span style="color:red;">(*)</span></td>
            <td><input type="text" name="createdate" id="createdate" value="${entryById.createdate}" />(yyyy-MM-dd)</td>
        </tr>
        <tr>
            <th colspan="2">
                <input type="submit" value="提交"/>
                <input type="button" value="返回" onclick="location.href='${pageContext.request.contextPath}/book/bookList.do'"/>
            </th>
        </tr>
    </table>
    </form>
</div>
</body>
</html>
